<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title></title>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <meta name="generator" content=""/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <link href="/static/css/haiersoft.css" rel="stylesheet" type="text/css" media="screen,print"/>
    <link href="/static/css/print.css" rel="stylesheet" type="text/css" media="print"/>
    <script src="/static/js/jquery-1.10.1.min.js"></script>
    <script src="/static/js/side.js" type="text/javascript"></script>

    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
    <![endif]-->
</head>

<body>


<!-- MainForm -->
<div id="MainForm">
    <div class="form_boxA">
        <h2>班级信息列表</h2>
        <table cellpadding="0" cellspacing="0">
            <tr>
                <th>序号</th>
                <th>班级名称</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            {% for grade in grades %}
            <tr>
                <td>{{grade.g_id }}</td>
                <td>{{grade.g_name }}</td>
                <td>{{grade.g_create_time}}</td>
                <td>
                    <a href="/user/edit_grade/?g_id={{grade.g_id }}">编辑</a> |
                    <a href="#">删除</a> |
                    <a href="/user/grade_student/?g_id={{grade.g_id}}">查看学生</a>
                </td>
            </tr>
            {% endfor %}
        </table>
        <p class="msg">共找到{{paginate.total}}条匹配记录</p>
    </div>

    <ul id="PageNum">

        <li><a href="/user/grade/?page=1">首页</a></li>
        {% if paginate.has_prev %}
            <li><a href="/user/grade/?page={{ paginate.prev_num }}">上一页</a></li>
        {% endif %}

        {% for p  in paginate.iter_pages() %}
            <li>
                {% if p %}
                    {% if p != paginate.page %}
                    <a href="/user/grade/?page={{ p }}">{{ p }}</a>
                    {% else %}
                    <span> {{ p }} </span>
                    {% endif %}
                {% else %}
                    <span>...</span>
                {% endif %}
            </li>
        {% endfor  %}

        {% if paginate.has_next %}
            <li><a href="/user/grade/?page={{ paginate.next_num }}">下一页</a></li>
        {% endif %}
            <li><a href="/user/grade/?page={{ paginate.pages }}">尾页</a></li>
        <span>| 共{{paginate.pages}}页 | 当前第{{paginate.page}}页</span>
    </ul>

</div>

</body>
</html>